package com.example.autotest.controller;

import com.example.autotest.entity.User;
import com.example.autotest.service.UserService;
import org.apache.ibatis.annotations.Param;
import io.swagger.annotations.Api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Api(tags = "用户管理")  //使用在接口类上，对接口类的说明
public class UserController {
    @Autowired
    private UserService userService;


    @GetMapping("/select")
    public User selectById(@Param("id") int id ){
        return userService.getById(id);
    }

}